from django.core.files.storage import Storage
from django.utils.deconstruct import deconstructible
from meiduo_mall import settings


@deconstructible
class CustomStroge(Storage):
    """自定义存储类"""

    def _open(self):
        pass

    def _save(self):
        pass

    def url(self, name):
        """重写url，返回正确的文件地址"""
        return 'http://192.168.190.132:8888/' + name
